import { Router, Route, Switch, Redirect } from 'react-router-dom'
import Login from 'pages/Login/index'
import NotFound from 'pages/NotFound/index'
import Layout from 'pages/Layout/index'
// import AuthRoute from 'components/AuthRoute/index'
import PrivateRoute from 'components/PrivateRoute/index'
import history from 'utils/history'
function App() {
  return <Router history={history}>
    <div className="App">
      <Switch>
        <Redirect exact from="/" to="/home"></Redirect>
        {/* <AuthRoute path="/home" component={Home}></AuthRoute> */}
        <PrivateRoute path="/home" component={Layout}></PrivateRoute>
        {/* <Route path="/home" component={Layout}></Route> */}
        <Route path="/login" component={Login}></Route>
        <Route component={NotFound}></Route>
      </Switch>
    </div>
  </Router>
}

export default App;
